#ifndef __EKOS_KERNEL_LAPIO_H__
#define __EKOS_KERNEL_LAPIO_H__

typedef uint8_t apic_id_t;

int  lapic_init(void);
int  lapic_init_ap(void);
void lapic_eoi(void);
void lapic_start_ap(apic_id_t apicid, physaddr_t addr);

extern volatile uint32_t lapic[];

/* Get the current cpu id by reading the LAPIC register */
int  cur_cpu(void);
/* Send a interrupt to another cpu and wait the cpu to ack */
int  send_ipi(int cpu, int func, int arg0, int arg1, int arg2, int arg3);

#endif
